<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>新闻发布页</title>
    <link rel="stylesheet" th:href="@{/assets/css/styles.css}">
    <link rel="stylesheet" th:href="@{/assets/css/colors.css}">
    <script th:src="@{/assets/js/jquery.min.js}"></script>
    <script th:src="@{/assets/js/popper.min.js}"></script>
    <script th:src="@{/assets/js/bootstrap.min.js}"></script>
    <script th:src="@{/assets/js/custom.js}"></script>
    <script th:src="@{/assets/js/daterangepicker.js}"></script>
    <script th:src="@{/assets/js/dropzone.js}"></script>
    <script th:src="@{/assets/js/imagesloaded.js}"></script>
    <script th:src="@{/assets/js/ion.rangeSlider.min.js}"></script>
    <script th:src="@{/assets/js/jquery.magnific-popup.min.js}"></script>
    <script th:src="@{/assets/js/lightbox.js}"></script>
    <script th:src="@{/assets/js/markerclusterer.js}"></script>
    <script th:src="@{/assets/js/moment.min.js}"></script>
    <script th:src="@{/assets/js/morris.min.js}"></script>
    <script th:src="@{/assets/js/raphael.min.js}"></script>
    <script th:src="@{/assets/js/select2.min.js}"></script>
    <script th:src="@{/assets/js/slick.js}"></script>
    <script th:src="@{/assets/js/slider-bg.js}"></script>
    <script th:src="@{/assets/js/script.js}"></script>
</head>
<body>
    <!-- 复用首页头部 -->
    <header th:replace="index::header"></header>
    <!-- 提示框信息 -->
    <div th:replace="point-modal::modal"></div>
    <!-- 发布房源信息，填写相关内容 -->
    <div class="container"  style="margin-bottom: -20px; height: 695px;overflow: auto;">
        <!-- 个人信息页 -->
        <section class="p-0">
            <div class="container-fluid p-0">
                <div class="row">
                    <!-- 左侧导航栏 -->
                    <div th:replace="sidebar::left"></div>
                    <!-- 右侧信息页 -->
                    <div class="col-lg-9 col-md-8 col-sm-12" style="height:695px;overflow:auto;">
                        <section style="padding-top: 10px">
                            <div class="container">
                                <div class="row">
                                    <!-- 表单提交 -->
                                    <form id="newsForm" method="post">
                                        <input type="hidden" id="id" name="id" th:value="${news==null?null:news.id}">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="submit-page form-simple">
                                                <div class="frm_submit_block">
                                                    <h3>发布/编辑新闻</h3>
                                                    <div class="form-row">
                                                        <div class="form-group col-md-12">
                                                            <label>新闻标题</label>
                                                            <input type="text" id="title" name="title" class="form-control" style="width: 700px;" th:value="${news==null?null:news.title}">
                                                        </div>
                                                        <div class="form-group col-md-12">
                                                            <label>新闻摘要</label>
                                                            <textarea class="form-control h-120" id="summary" name="summary" style="min-height: 80px; width: 700px;" th:utext="${news==null?null:news.summary}"></textarea>
                                                        </div>
                                                        <div class="form-group col-md-12">
                                                            <label>新闻内容</label>
                                                            <textarea class="form-control h-240" id="content" name="content" style="min-height: 200px; width: 700px;" th:utext="${news==null?null:news.content}"></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-lg-12 col-md-12">
                                                        <button class="btn btn-theme bg-2" type="button" onclick="publishNews()">发布</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </section>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <!-- 复用首页底部 -->
    <div th:replace="index::footer"></div>

    <script>
        $(function () {
            $("#addNewsInfo").attr("class", "active");
        })
    </script>
</body>
</html>